package loader;

import java.net.URL;
import java.util.Enumeration;

/**
 * Created by Administrator on 2017/10/25 025.
 */
public class Demo3
{
    public static void main(String[] args) throws Exception
    {
        ClassLoader cl = ClassLoader.getSystemClassLoader();
        System.out.println("系统加载器：" + cl);
        Enumeration<URL> urls = cl.getResources("");
        while (urls.hasMoreElements())
        {
            System.out.println(urls.nextElement());
        }

        ClassLoader ext = cl.getParent();
        System.out.println("Ext" + ext);
        System.out.println("Ext Dirs" + System.getProperty("java.ext.dirs"));
        System.out.println("Ext parent:" + ext.getParent());
    }
}
